Water main break decision-theory example (draft) - #45
Draft
bwengals wants to merge 6 commits into
Draft
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Break records are effectively complete only from 1997 (one record in each of 1995 and 1996), so RECORD_START and PANEL_START move to 1997.0. notebooks/dev/ holds the two finalized runners: final_ladder_seq97.py (M1, M2, HGB, GLM walk-forward CV with per-fold caches) and m4_cv.py (final Model 3: additive GP blocks with frailty and iid-year effects, R2D2 budget with a variational posterior, natural-gradient training). watermains_plan.md records the current state and how to rerun; result caches are gitignored and regenerate from scratch.
The dev CV scripts (final_ladder_seq97.py, m4_cv.py) run folds as concurrent workers through a WM_FOLDS subset selector, and all three GP models train at 3000 steps. watermains.ipynb re-executed against the seq97 caches; the M1/M2/HGB/GLM tables and the Model 2 commentary now reflect the 3000-step run. Pooled 7-fold ELPD: M1 -2310.1, M2 -2260.1, HGB -2244.6, GLM -2351.4, M3 -2232.4 (M3 beats tuned HGB).
The seq97 (M1/M2/HGB/GLM) and m4 (M3) fold caches, un-ignored via .gitignore exceptions so a second machine can continue authoring without rerunning the multi-hour CV. Normally gitignored as regenerable; drop before merging to main.
setup-jupyter-mcp.sh is a one-off local JupyterLab/MCP setup helper, not project code; removed from tracking (local copy retained). The frozen-cache .gitignore exception comment no longer references machine-specific handoff.
Records the frozen 7-fold pooled table (M3 beats HGB, -2232.4 vs -2244.6), the beta_year sign change to consistently negative at 3000 steps, the notebook rewire/execution state, and the remaining Model 3 and decision-theory authoring work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A docs example that fits a GP survival model to the City of Kitchener open water main data and uses decision theory per Rasmussen and Williams Ch 2, to turn the predictive distribution into a dollar-valued replace or defer decision.
Not ready to merge because a backtest shows that the model doesn't yet beat a naive "replace what broke before" policy because it ignores each pipe's own break history. Next step is a per-pipe frailty (or a slight reframe) before it's ready.